package com.ws.q1.mapper;

import com.ws.q1.bean.LanMu;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

import java.util.List;

public interface LanMuMapper {

    @Insert("INSERT INTO lanmu (name, lan_order) VALUES (#{name}, #{lan_order})")
    int add(@Param("name") String name, @Param("lan_order") String lan_order);

    @Select("select * from lanmu")
    List<LanMu> list();

    @Select("delete from lanmu where Lid=#{id}")
    void deleteById(Integer id);

    @Select("update lanmu set name=#{name},lan_order=#{lan_order} where Lid=#{lid}")
    void update(LanMu lanMu);

    @Select("select * from lanmu where Lid=#{id}")
    LanMu huixian(Integer id);


    @Select("select * from lanmu")
    List<LanMu> list1();


}
